package com.tgu.home_action.pojo;

import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.models.auth.In;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.NotNull;
import java.sql.Timestamp;

@Data
@TableName(value = "track_point")
@ApiModel(description = "轨迹点")
public class TrackPoint {
    @ApiModelProperty("位置")
    private String point;
    @ApiModelProperty("经度")
    private Double longitude;
    @ApiModelProperty("纬度")
    private Double latitude;
    @ApiModelProperty("案件ID")
    private Integer caseId;
    @ApiModelProperty("志愿者ID")
    private Integer volunteerId;
    @ApiModelProperty(value = "创建时间",dataType = "java.sql.Date")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Timestamp createAt;

    public TrackPoint() {
    }

    public TrackPoint(String point, Integer caseId, Integer volunteerId) {
        this.point = point;
        this.caseId = caseId;
        this.volunteerId = volunteerId;
    }

    public TrackPoint(String point, Integer caseId, Integer volunteerId, Timestamp createAt) {
        this.point = point;
        this.caseId = caseId;
        this.volunteerId = volunteerId;
        this.createAt = createAt;
    }

    public TrackPoint(Double longitude, Double latitude, Integer caseId, Integer volunteerId) {
        this.longitude = longitude;
        this.latitude = latitude;
        this.caseId = caseId;
        this.volunteerId = volunteerId;
    }

    public TrackPoint(Double longitude, Double latitude, Integer caseId, Integer volunteerId, Timestamp createAt) {
        this.longitude = longitude;
        this.latitude = latitude;
        this.caseId = caseId;
        this.volunteerId = volunteerId;
        this.createAt = createAt;
    }
}
